package com.lemon.reggie.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lemon.reggie.pojo.dto.AddEmployeeDTO;
import com.lemon.reggie.pojo.dto.EditAndAbleDTO;
import com.lemon.reggie.pojo.dto.LoginDTO;
import com.lemon.reggie.pojo.entity.Employee;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 员工信息 服务类
 * </p>
 *
 * @author Lemon
 * @since 2022-05-23
 */
public interface EmployeeService extends IService<Employee> {

    /**
     * 后台员工登录
     * @param loginDTO
     * @return com.lemon.reggie.pojo.entity.Employee
     * @author Guannankun
     * @since 2022/5/24
     */
    Employee login(LoginDTO loginDTO, HttpServletRequest request);

    /**
     * 后台员工登出
     * @param request
     * @return void
     * @author Guannankun
     * @since 2022/5/24
     */
    void logout(HttpServletRequest request);

    /**
     * 员工分页
     * @param currentPage
     * @param pageSize
     * @param name
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.lemon.reggie.pojo.entity.Employee>
     * @author Guannankun
     * @since 2022/5/26
     */
    IPage<Employee> pageEmployee(Long currentPage, Long pageSize, String name);

    /**
     * 添加员工
     * @param addEmployeeDTO
     * @return void
     * @author Guannankun
     * @since 2022/8/6
     */
    void addEmployee(AddEmployeeDTO addEmployeeDTO);

    /**
     * 禁用启用
     * @param editAndAbleDTO
     * @return void
     * @author Guannankun
     * @since 2022/8/6
     */
    void enableAndDis(EditAndAbleDTO editAndAbleDTO);

}
